package com.yipinhouse.common.exception;

import com.yipinhouse.common.resultcode.ResultCode;

public class UserException extends RuntimeException{
    private Integer code;
    public UserException(String msg, Integer code){
        super(msg);
        this.code = code;
    }

    public UserException(ResultCode code){
        super(code.getMessage());
        this.code = code.getCode();
    }

    public Integer getCode(){
        return this.code;
    }
}
